package com.aratek.huwai.controller;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author Yvan Jiang
 * @version 0.0.1
 * @Title WebAppConfigurer
 * @note 拦截器配置
 * @note Copyright 2016 by Aratek . All rights reserved
 * @time 2017/7/27
 **/
@Configuration
public class WebAppConfigurer extends WebMvcConfigurerAdapter {
    
    
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController( "/" ).setViewName( "redirect:/templates/list.html" );
        registry.setOrder( Ordered.HIGHEST_PRECEDENCE );
        super.addViewControllers(registry);
    }
}
